package com.fuyin.commons.exception;

import lombok.Data;

/**
 * @author yuanxilan (yuanxilan@keep.com)
 * @Description 自定义Api异常
 * @date 2021年10月27日 10:12 上午
 * @since
 */
@Data
public class ApiException extends RuntimeException {

    private int errorCode;

    private String errorMessage;

    public ApiException() {
    }

    public ApiException(int errorCode, String errorMessage) {
        super(errorMessage);
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    public ApiException(String message) {
        super(message);
    }

    public ApiException(Throwable cause) {
        super(cause);
    }

    public ApiException(String message, Throwable cause) {
        super(message, cause);
    }
}
